<?php
$cs = Yii::app()->getClientScript();
$cs->registerCSSFile(Yii::app()->request->baseUrl . '/css/main.css')
        ->registerCSSFile(Yii::app()->request->baseUrl . '/css/form.css')
        ->registerCSSFile(Yii::app()->request->baseUrl . '/css/themes/default/jquery.mobile-1.4.2.min.css')
        ->registerCSSFile(Yii::app()->request->baseUrl . '/css/jqm-datebox.min.css')
        ->registerCoreScript('jquery');
//$cs->registerCoreScript('jquery.ui');

$cs->registerCoreScript('jqm-setting')
        ->registerCoreScript('jquery.mobile');
$themePath = Yii::app()->request->baseUrl;
/**
 * StyleSheets
 */
if ($this->useBootstrap) {
    $cs->registerCssFile($themePath . '/assets/css/bootstrap.css');
    $cs->registerCssFile($themePath . '/assets/css/bootstrap-theme.css');
    $cs->registerCssFile($themePath . '/assets/css/jasny-bootstrap.min.css');
    $cs->registerScriptFile($themePath . '/assets/js/bootstrap.min.js', CClientScript::POS_END);
    $cs->registerScriptFile($themePath . '/assets/js/jasny-bootstrap.min.js', CClientScript::POS_END);
    $cs->registerScript('tooltip', "$('[data-toggle=\"tooltip\"]').tooltip();$('[data-toggle=\"popover\"]').tooltip()", CClientScript::POS_READY);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />
        <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">

            <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>

    <body>

<!--        <div data-role='page' id='mainPage'>
            <div data-role='content' id='mainContent' style='padding:0;'>
                <?php echo $content; ?>
            </div>
        </div>-->

        <?php
        if (isset($this->dialog) && $this->dialog != NULL) {
            $this->renderPartial($this->dialog, $this->dialogInfo);
        }
        ?>

    </body>
</html>

<script>
    $('#mainPage').on('pageshow', function() {
        $(":checkbox").hide(); //fix render issue by caix
    });
</script>
